package com.miku.sys.security.realm;

import com.miku.db.sys.entity.SysUser;

/**
 * 用户和密码（包含验证码）令牌类
 */
public class LcUsernamePasswordToken extends org.apache.shiro.authc.UsernamePasswordToken {

	private static final long serialVersionUID = 1L;

	private String captcha;
	private boolean mobileLogin;
	private SysUser loginOfUser;

	public LcUsernamePasswordToken(String username, String password,
			boolean rememberMe, String host, String captcha, boolean mobileLogin) {
		super(username, password, rememberMe, host);
		this.captcha = captcha;
		this.mobileLogin = mobileLogin;
	}
	
	public LcUsernamePasswordToken(SysUser u, String username, String password,
			boolean rememberMe, String host, String captcha, boolean mobileLogin) {
		super(username, password, rememberMe, host);
		this.captcha = captcha;
		this.mobileLogin = mobileLogin;
		this.loginOfUser = u;
	}

	public String getCaptcha() {
		return captcha;
	}

	public void setCaptcha(String captcha) {
		this.captcha = captcha;
	}

	public boolean isMobileLogin() {
		return mobileLogin;
	}

	public SysUser getLoginOfUser() {
		return loginOfUser;
	}

	public void setLoginOfUser(SysUser loginOfUser) {
		this.loginOfUser = loginOfUser;
	}
}